package com.liushuo.service;

import com.liushuo.entity.Mistake;
import com.liushuo.dao.MistakeDao;

import java.util.Date;
import java.util.List;

public class MistakeService {
    private final MistakeDao mistakeDAO = new MistakeDao();

    public boolean recordMistake(String userId, int questionId, int wrongAnswer) {
        return mistakeDAO.recordMistake(userId, questionId, wrongAnswer);
    }

    public List<Mistake> getMistakes(String userId, Date startDate, Date endDate) {
        return mistakeDAO.getMistakes(userId, startDate, endDate);
    }

}
